 /* styles.css */

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;      
}
  
header {
  background-color: #003366;
  padding: 1rem;
  color: white;
}
  
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
  
.logo {
  font-size: 1.5rem;
  font-weight: bold;
}
  
.nav-links {
  list-style: none;
  display: flex;
   gap: 1rem;
  margin: 0;
  padding: 0;
}
  
.nav-links li {
  position: relative;
}
  
.nav-links a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
  display: block;
}
  
.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  color: #a9c8f1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  top: 100%;
  left: 0;
  min-width: 200px;
  z-index: 1000;
}
  
.dropdown-content li a {
  color: #333;
  padding: 0.5rem 1rem;
}
  
.dropdown:hover .dropdown-content {
   display: block;
}
  
.hero {
  position: sticky;
  background-color: #e0f0ff;
  padding: 2rem;
  text-align: center;
}

.hero h1 {
  margin-top: -1%;
  text-align: center;
  font-size: x-large;
}

.hero p {
  text-align: center;
  font-size: large;
}
  
.search-bar {
  padding: 1rem;
  text-align: center;
  background-color: #fff;
}
  
.search-bar input {
  padding: 0.5rem;
  width: 60%;
  max-width: 400px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-bar button {
  width: 40px;
  height: 33px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
  
section {
  margin-bottom: 1rem;
}

p {
  line-height: 1.3em;
  line-break: normal;
  margin-bottom: 1rem;
}

h2 h1 {
  font-size: 1.5rem;
}

section h1 {
  font-size: 1.25rem;
  line-height: -5px;
  color: #003366;
}
  
section h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  line-height: -10px;
  color: #003366;
}

section h3 {
  font-size: 1.25rem;
  line-height: -5px;
  color: #003366;
}
  
ul {
  list-style: none;
  padding-left: 1rem;
}
  
ul li {
  margin-bottom: 0.5rem;
}

.dropdown-content a:hover{
  background-color: #cedff3;
}

.aside {
  flex: 1;
  min-width: 250px;
  background-color: #fff;
  padding: 1rem;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

/* --------------- */

/* Sidebar styling */
.container {
  display: flex;
  flex-direction: row;
}

.left-sidebar {
  width: 300px;
  background-color: #e0f0ff;
  padding: 16px;
  color: #fff;
  border-radius: 8px;
  top: 0;
  left: 0;
  height: 100vh;
  transition: transform 0.35 ease;
  z-index: 999;
}

.right-sidebar {
  width: 440px;
  background-color: #fff;
  padding: 20px;
  color: #fff;
  height: 100vh;
}

#comment-sidebar {
  width: 300px;
  /* padding: 16px; */
  color: #0f0f0f;
  /* border-radius: 8px;
  top: 0;
  right: 0;
  height: 100vh; */
  transition: transform 0.35 ease;
  z-index: 999;
  overflow-y: auto;
}

#comment-form input,
#comment-form textarea {
  width: 280px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#comment-form button {
  width: 100%;
  padding: 10px;
  background-color: #e0f0ff;
  color: black;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#comment-form button:hover {
  background-color: #005fa3;
}


.comment-item {
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
  color: #000;
}

.comment-meta {
  font-size: 0.9em;
  color: black;
}

.comment-actions {
  margin-top: 6px;
}

.comment-actions button {
  margin-right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #e0f0ff;
}

.reply-form {
  margin-top: 8px;
  padding-left: 20px;
}

.reply-form button {
  color: darkslategray;
}

.sidebar h2 {
  font-size: 1.4em;
  margin-bottom: 20px;
}

.menu-item {
  display: block;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 6px;
  background-color: #003366;
  text-decoration: none;
  color: #fff;
  transition: background-color 0.3s;
  cursor: pointer;
}

.menu-item:hover {
  background-color: #1abc9c;
}

    /* Main content styling */
.main-content {
  flex-grow: 2;
  padding: 16px;
  margin: 0 30px;
  background-color: #ecf0f1;
  overflow-y: auto;
  box-shadow: 0 0 6px rgba(0,0,0,0.05);
}

#display-area {
  height: 2px;
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  white-space: pre-wrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#company-profile {
  margin-top: 2rem;
  padding: 1rem;
  border-top: 1px solid #ccc;
  background-color: #fafafa;
  font-size: 0.95em
}

.hidden {
  display: none;
}

#company-view {
  /* height: auto; */
  /* padding: 0; */
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap; /* Helps on smaller screens */
  /* margin-top: 1rem; */
}

#company-details {
  flex: 1;
  /* max-width: 300px;
  font-size: 0.95em;
  line-height: 1.4; */
  padding: 15px;
  background: #f9f9f9;
  border: none;
  border-radius: 8px;
}

/* .details {
  flex: 1;
  padding: 15px;
  background: #f9f9f9;
  border: none;
  border-radius: 6px;
} */

.chart {
  flex: 1;
  padding: 15px;
  border-radius: 8px;
}

canvas {
  width: 100% !important;   /* adjust as needed */
  height: auto !important;      /* proportionate height */
  /* center horizontally */
}

/*Stock Market data*/
.stock-market-data {
  margin-bottom: 2rem;
  width: 100%;
  overflow-x: auto;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.market-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; /* Prevents squishing */
}

.market-table th,
.market-table td {
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap;
}

th, td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
  width: auto;
}

th {
  background-color: #e0f0ff;
  color: #003366;
}

tr:nth-child(even) {
  background-color: #f2f2f2;
}

.pagination {
  text-align: center;
  margin-top: 20px;
}

.pagination button {
  padding: 8px 16px;
  margin: 0 10px;
  font-size: 14px;
  cursor: pointer;
  background-color: #e0f0ff;
  color: black;
  border: none;
  border-radius: 4px;
}

.pagination button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.company-hover {
  cursor: pointer;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.company-hover:hover {
  color: #007acc; /* or any accent color you prefer */
  text-decoration: underline;
}

.company-comparison {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.top-five, .bottom-five {
   flex: 1;
   min-width: 300px;
   background: #f9f9f9;
   padding: 1rem;
   border: 1px solid #ccc;
   border-radius: 8px;
   font-size: 0.80em; 
}

.ytd-up {
  color: green;
  font-weight: bold;
}
.ytd-down {
  color: red;
  font-weight: bold;
}

footer p {
  text-align: center;
}

.hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: white;
}


/* Responsive Design */
@media (max-width: 768px) {
  body {
    font-size: 0.85rem;
    padding: 0;
    margin: 0;
    /* Optional: adjust global spacing or background if needed */
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  .header-hero-wrapper,
  .search-bar,
  .aside,
  .main-content,
  .right-sidebar
  #comment-sidebar {
    padding: 0.5rem !important;
    margin: 0 !important;
  }
  .left-sidebar {
    display: none;
  }
  .container {
    flex-direction: column;
  }

  .index-table th,
  .index-table td {
    padding: 6px 8px;
  }

  .market-table th,
  .market-table td {
    padding: 6px 8px;
  }

  nav {
    flex-direction: row;
    position: relative;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: #003366;
    position: absolute;
    top: 60px; /* adjust as needed */
    right: 0;
    width: 100%;
    z-index: 1001;
  }

  .nav-links.open {
    display: flex;
  }
  .hamburger {
    display: block;
  }
}






